28b88d89db52b4049c0d11676fde9be88738ced5,org.openwms.tms/org.openwms.tms.transportation/src/test/java/org/openwms/tms/RedirectTODocumentation.java,RedirectTODocumentation,testRedirectToKnownTargets,#,108
Before Change
given(commonGateway.getLocation(UNKNOWN)).willReturn(Optional.of(INIT_LOC));
// test ...
mockMvc.perform(
patch(TMSConstants.ROOT_ENTITIES)
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(vo))
)
.andExpect(status().isNoContent())
.andDo(document("to-patch-target-unknown-target"))
;
}
public
After Change
@Test
void testRedirectToKnownTargets() throws Exception {
// setup ...
CreateTransportOrderVO vo = createTO();
postTOAndValidate(vo, NOTLOGGED);
vo.setTarget(UNKNOWN);
given(commonGateway.getLocationGroup(UNKNOWN)).willReturn(Optional.of(ERR_LOCGRB));
given(commonGateway.getLocation(UNKNOWN)).willReturn(Optional.of(INIT_LOC));
// test ...
sendPatch(vo, status().isNoContent(), "to-patch-target-known-target");
}
public